// CodeGear C++Builder
// Copyright (c) 1995, 2015 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'ocv.compat.pas' rev: 30.00 (Windows)

#ifndef Ocv_CompatHPP
#define Ocv_CompatHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <ocv.core.types_c.hpp>
#include <ocv.imgproc.types_c.hpp>
#include <ocv.core_c.hpp>

//-- user supplied -----------------------------------------------------------

namespace Ocv
{
namespace Compat
{
//-- forward type declarations -----------------------------------------------
struct TCvRandState;
struct TCvPixelPosition8u;
struct TCvPixelPosition8s;
struct TCvPixelPosition32f;
struct TCvSURFPoint;
struct TCvSURFParams;
struct TCvMSERParams;
struct TCvStarKeypoint;
struct TCvStarDetectorParams;
//-- type declarations -------------------------------------------------------
typedef int TCvMatType;

typedef int TCvDisMaskType;

typedef Ocv::Core::Types_c::TCvMat TCvMatArray;

typedef int TCvThreshType;

typedef int TCvAdaptiveThreshMethod;

typedef int TCvCompareMethod;

typedef int TCvFontFace;

typedef int TCvPolyApproxMethod;

typedef int TCvContoursMatchMethod;

typedef int TCvContourTreesMatchMethod;

typedef int TCvCoeffType;

typedef int TCvRodriguesType;

typedef int TCvElementShape;

typedef int TCvMorphOp;

typedef int TCvTemplMatchMethod;

typedef Ocv::Core::Types_c::TCvPoint2D64f TCvPoint2D64d;

typedef Ocv::Core::Types_c::TCvPoint3D64f TCvPoint3D64d;

typedef Ocv::Core::Types_c::TCvBox2D TCvBox2D32f;

typedef TCvRandState *pCvRandState;

struct DECLSPEC_DRECORD TCvRandState
{
public:
	unsigned __int64 state;
	int disttype;
	System::StaticArray<Ocv::Core::Types_c::TCvScalar, 2> param;
};


typedef int TCvDisType;

typedef int TCvChainApproxMethod;

typedef int TCvContourRetrievalMode;

struct DECLSPEC_DRECORD TCvPixelPosition8u
{
public:
	System::Byte *currline;
	System::Byte *topline;
	System::Byte *bottomline;
	int x;
	int width;
	int height;
	int step;
	System::StaticArray<int, 3> step_arr;
};


struct DECLSPEC_DRECORD TCvPixelPosition8s
{
public:
	System::Int8 *currline;
	System::Int8 *topline;
	System::Int8 *bottomline;
	int x;
	int width;
	int height;
	int step;
	System::StaticArray<int, 3> step_arr;
};


struct DECLSPEC_DRECORD TCvPixelPosition32f
{
public:
	float *currline;
	float *topline;
	float *bottomline;
	int x;
	int width;
	int height;
	int step;
	System::StaticArray<int, 3> step_arr;
};


typedef System::PSingle TCvVect32f;

typedef System::PSingle TCvMatr32f;

typedef System::PDouble TCvVect64d;

typedef System::PDouble TCvMatr64d;

typedef TCvSURFPoint *pCvSURFPoint;

struct DECLSPEC_DRECORD TCvSURFPoint
{
public:
	Ocv::Core::Types_c::TCvPoint2D32f pt;
	int laplacian;
	int size;
	float dir;
	float hessian;
};


typedef TCvSURFParams *pCvSURFParams;

struct DECLSPEC_DRECORD TCvSURFParams
{
public:
	int extended;
	int upright;
	double hessianThreshold;
	int nOctaves;
	int nOctaveLayers;
};


typedef TCvMSERParams *pCvMSERParams;

struct DECLSPEC_DRECORD TCvMSERParams
{
public:
	int delta;
	int maxArea;
	int minArea;
	float maxVariation;
	float minDiversity;
	int maxEvolution;
	double areaThreshold;
	double minMargin;
	int edgeBlurSize;
};


struct DECLSPEC_DRECORD TCvStarKeypoint
{
public:
	Ocv::Core::Types_c::TCvPoint pt;
	int size;
	float response;
};


typedef TCvStarDetectorParams *pCvStarDetectorParams;

struct DECLSPEC_DRECORD TCvStarDetectorParams
{
public:
	int maxSize;
	int responseThreshold;
	int lineThresholdProjected;
	int lineThresholdBinarized;
	int suppressNonmaxSize;
};


//-- var, const, procedure ---------------------------------------------------
extern DELPHI_PACKAGE int CV_MAT32F;
extern DELPHI_PACKAGE int CV_MAT3x1_32F;
extern DELPHI_PACKAGE int CV_MAT4x1_32F;
extern DELPHI_PACKAGE int CV_MAT3x3_32F;
extern DELPHI_PACKAGE int CV_MAT4x4_32F;
extern DELPHI_PACKAGE int CV_MAT64D;
extern DELPHI_PACKAGE int CV_MAT3x1_64D;
extern DELPHI_PACKAGE int CV_MAT4x1_64D;
extern DELPHI_PACKAGE int CV_MAT3x3_64D;
extern DELPHI_PACKAGE int CV_MAT4x4_64D;
static const System::Int8 IPL_GAUSSIAN_5x5 = System::Int8(0x7);
static const System::Int8 CV_SHIFT_NONE = System::Int8(0x2);
static const System::Int8 CV_SHIFT_LEFT = System::Int8(0x1);
static const System::Int8 CV_SHIFT_RIGHT = System::Int8(0x3);
static const System::Int8 CV_SHIFT_UP = System::Int8(0x6);
static const System::Int8 CV_SHIFT_DOWN = System::Int8(0xa);
static const System::Int8 CV_SHIFT_LU = System::Int8(0x5);
static const System::Int8 CV_SHIFT_RU = System::Int8(0x7);
static const System::Int8 CV_SHIFT_LD = System::Int8(0x9);
static const System::Int8 CV_SHIFT_RD = System::Int8(0xb);
static const System::Int8 CV_RODRIGUES_M2V = System::Int8(0x0);
static const System::Int8 CV_RODRIGUES_V2M = System::Int8(0x1);
extern DELPHI_PACKAGE void __fastcall CV_INIT_PIXEL_POS(TCvPixelPosition8u &pos, int origin, int _step, const Ocv::Core::Types_c::TIplROI &roi, int _x, int _y, int orientation)/* overload */;
extern DELPHI_PACKAGE void __fastcall CV_INIT_PIXEL_POS(TCvPixelPosition8s &pos, int origin, int _step, const Ocv::Core::Types_c::TIplROI &roi, int _x, int _y, int orientation)/* overload */;
extern DELPHI_PACKAGE void __fastcall CV_INIT_PIXEL_POS(TCvPixelPosition32f &pos, int origin, int _step, const Ocv::Core::Types_c::TIplROI &roi, int _x, int _y, int orientation)/* overload */;
extern DELPHI_PACKAGE TCvSURFPoint __fastcall cvSURFPoint(const Ocv::Core::Types_c::TCvPoint2D32f &pt, int laplacian, int size, float dir = 0.000000E+00f, float hessian = 0.000000E+00f);
extern DELPHI_PACKAGE TCvStarKeypoint __fastcall cvStarKeypoint(const Ocv::Core::Types_c::TCvPoint &pt, int size, float response);
extern DELPHI_PACKAGE TCvStarDetectorParams __fastcall cvStarDetectorParams(int maxSize = 0x2d, int responseThreshold = 0x1e, int lineThresholdProjected = 0xa, int lineThresholdBinarized = 0x8, int suppressNonmaxSize = 0x5);
extern "C" Ocv::Core::Types_c::TCvMat __cdecl cvMatArray(int rows, int cols, int type_, int count, void * data = (void *)(0x0));
extern "C" double __cdecl cvMean(const void * image, const void * mask = (void *)(0x0));
extern "C" double __cdecl cvSumPixels(const void * image);
extern "C" void __cdecl cvMean_StdDev(const void * image, System::PDouble mean, System::PDouble sdv, const void * mask = (void *)(0x0));
extern "C" void __cdecl cvmPerspectiveProject(const Ocv::Core::Types_c::pCvMat mat, const void * src, void * dst);
extern "C" void __cdecl cvFillImage(void * mat, double color);
extern "C" void __cdecl cvRandSetRange(pCvRandState state, double param1, double param2, int index = 0xffffffff);
extern "C" void __cdecl cvRandInit(pCvRandState state, double param1, double param2, int seed, int disttype = 0x0);
extern "C" void __cdecl cvRand(pCvRandState state, void * arr);
extern "C" void __cdecl cvbRand(pCvRandState state, System::PSingle dst, int len);
extern "C" void __cdecl cvbCartToPolar(const System::PSingle y, const System::PSingle x, float &magnitude, float &angle, int len);
extern "C" void __cdecl cvbFastArctan(const System::PSingle y, const System::PSingle x, float &angle, int len);
extern "C" void __cdecl cvbSqrt(const System::PSingle x, float &y, int len);
extern "C" void __cdecl cvbInvSqrt(const System::PSingle x, float &y, int len);
extern "C" void __cdecl cvbReciprocal(const System::PSingle x, float &y, int len);
extern "C" void __cdecl cvbFastExp(const System::PSingle x, double &y, int len);
extern "C" void __cdecl cvbFastLog(const System::PDouble x, float &y, int len);
extern "C" Ocv::Core::Types_c::TCvRect __cdecl cvContourBoundingRect(void * point_set, int update = 0x0);
extern "C" double __cdecl cvPseudoInverse(const void * src, void * dst);
extern "C" void __cdecl cvConvexHull(Ocv::Core::Types_c::pCvPoint points, int num_points, Ocv::Core::Types_c::pCvRect bound_rect, int orientation, int &hull, int &hullsize);
extern "C" void __cdecl cvMinAreaRect(Ocv::Core::Types_c::pCvPoint points, int n, int left, int bottom, int right, int top, Ocv::Core::Types_c::pCvPoint2D32f anchor, Ocv::Core::Types_c::pCvPoint2D32f vect1, Ocv::Core::Types_c::pCvPoint2D32f vect2);
extern "C" void __cdecl cvFitLine3D(Ocv::Core::Types_c::pCvPoint3D32f points, int count, int dist, void * param, float reps, float aeps, float &line);
extern "C" void __cdecl cvFitLine2D(Ocv::Core::Types_c::pCvPoint2D32f points, int count, int dist, void * param, float reps, float aeps, float &line);
extern "C" void __cdecl cvFitEllipse(const Ocv::Core::Types_c::pCvPoint2D32f points, int count, Ocv::Core::Types_c::TCvBox2D &box);
extern "C" void __cdecl cvProject3D(Ocv::Core::Types_c::pCvPoint3D32f points3D, int count, Ocv::Core::Types_c::pCvPoint2D32f points2D, int xIndx = 0x0, int yIndx = 0x1);
extern "C" int __cdecl cvHoughLines(void * image, double rho, double theta, int threshold, Ocv::Core::Types_c::pFloat lines, int linesNumber);
extern "C" int __cdecl cvHoughLinesP(void * image, double rho, double theta, int threshold, int lineLength, int lineGap, System::PInteger lines, int linesNumber);
extern "C" int __cdecl cvHoughLinesSDiv(void * image, double rho, int srn, double theta, int stn, int threshold, Ocv::Core::Types_c::pFloat lines, int linesNumber);
extern "C" float __cdecl cvCalcEMD(const Ocv::Core::Types_c::pFloat signature1, int size1, const Ocv::Core::Types_c::pFloat signature2, int size2, int dims, int dist_type = 0x2, Ocv::Imgproc::Types_c::TCvDistanceFunction dist_func = 0x0, Ocv::Core::Types_c::pFloat lower_bound = (Ocv::Core::Types_c::pFloat)(0x0), void * user_param = (void *)(0x0));
extern "C" void __cdecl cvKMeans(int num_clusters, System::PSingle &samples, int num_samples, int vec_size, const Ocv::Core::Types_c::TCvTermCriteria termcrit, int &cluster_idx);
extern "C" void __cdecl cvStartScanGraph(Ocv::Core::Types_c::pCvGraph graph, Ocv::Core_c::pCvGraphScanner scanner, Ocv::Core::Types_c::pCvGraphVtx vtx = (Ocv::Core::Types_c::pCvGraphVtx)(0x0), int mask = 0xffffffff);
extern "C" void __cdecl cvEndScanGraph(Ocv::Core_c::pCvGraphScanner scanner);
extern "C" void __cdecl cvLineAA(void * img, const Ocv::Core::Types_c::TCvPoint pt1, const Ocv::Core::Types_c::TCvPoint pt2, double color, int scale = 0x0);
extern "C" void __cdecl cvCircleAA(void * img, const Ocv::Core::Types_c::TCvPoint center, int radius, double color, int scale = 0x0);
extern "C" void __cdecl cvEllipseAA(void * img, const Ocv::Core::Types_c::TCvPoint center, const Ocv::Core::Types_c::TCvSize axes, double angle, double start_angle, double end_angle, double color, int scale = 0x0);
extern "C" void __cdecl cvPolyLineAA(void * img, Ocv::Core::Types_c::pCvPoint &pts, int &npts, int contours, int is_closed, double color, int scale = 0x0);
extern "C" void __cdecl cvUnDistortOnce(const void * src, void * dst, const System::PSingle intrinsic_matrix, const System::PSingle distortion_coeffs, int interpolate);
extern "C" void __cdecl cvUnDistortInit(const void * src, void * undistortion_map, const System::PSingle A, const System::PSingle k, int interpolate);
extern "C" void __cdecl cvUnDistort(const void * src, void * dst, const void * undistortion_map, int interpolate);
extern "C" void __cdecl cvFindFundamentalMatrix(int &points1, int &points2, int numpoints, int method, float &matrix);
extern "C" int __cdecl cvFindChessBoardCornerGuesses(const void * arr, void * thresharr, Ocv::Core::Types_c::pCvMemStorage storage, const Ocv::Core::Types_c::TCvSize pattern_size, Ocv::Core::Types_c::pCvPoint2D32f corners, System::PInteger corner_count);
extern "C" void __cdecl cvCalibrateCamera(int image_count, int &_point_counts, const Ocv::Core::Types_c::TCvSize image_size, Ocv::Core::Types_c::pCvPoint2D32f _image_points, Ocv::Core::Types_c::pCvPoint3D32f _object_points, System::PSingle _distortion_coeffs, System::PSingle _camera_matrix, System::PSingle _translation_vectors, System::PSingle _rotation_matrices, int flags);
extern "C" void __cdecl cvCalibrateCamera_64d(int image_count, int &_point_counts, const Ocv::Core::Types_c::TCvSize image_size, Ocv::Core::Types_c::pCvPoint2D64f _image_points, Ocv::Core::Types_c::pCvPoint3D64f _object_points, System::PDouble _distortion_coeffs, System::PDouble _camera_matrix, System::PDouble _translation_vectors, System::PDouble _rotation_matrices, int flags);
extern "C" void __cdecl cvFindExtrinsicCameraParams(int point_count, const Ocv::Core::Types_c::TCvSize image_size, Ocv::Core::Types_c::pCvPoint2D32f _image_points, Ocv::Core::Types_c::pCvPoint3D32f _object_points, System::PSingle focal_length, const Ocv::Core::Types_c::TCvPoint2D32f principal_point, System::PSingle _distortion_coeffs, System::PSingle _rotation_vector, System::PSingle _translation_vector);
extern "C" void __cdecl cvFindExtrinsicCameraParams_64d(int point_count, const Ocv::Core::Types_c::TCvSize image_size, Ocv::Core::Types_c::pCvPoint2D64f _image_points, Ocv::Core::Types_c::pCvPoint3D64f _object_points, System::PDouble focal_length, const Ocv::Core::Types_c::TCvPoint2D64f principal_point, System::PDouble _distortion_coeffs, System::PDouble _rotation_vector, System::PDouble _translation_vector);
extern "C" void __cdecl cvRodrigues(Ocv::Core::Types_c::pCvMat rotation_matrix, Ocv::Core::Types_c::pCvMat rotation_vector, Ocv::Core::Types_c::pCvMat jacobian, int conv_type);
extern "C" void __cdecl cvProjectPoints(int point_count, Ocv::Core::Types_c::pCvPoint3D64f _object_points, System::PDouble _rotation_vector, System::PDouble _translation_vector, System::PDouble focal_length, const Ocv::Core::Types_c::TCvPoint2D64f principal_point, System::PDouble _distortion, Ocv::Core::Types_c::pCvPoint2D64f _image_points, System::PDouble _deriv_points_rotation_matrix, System::PDouble _deriv_points_translation_vect, System::PDouble _deriv_points_focal, System::PDouble _deriv_points_principal_point, System::PDouble _deriv_points_distortion_coeffs);
extern "C" void __cdecl cvProjectPointsSimple(int point_count, Ocv::Core::Types_c::pCvPoint3D64f _object_points, System::PDouble _rotation_matrix, System::PDouble _translation_vector, System::PDouble _camera_matrix, System::PDouble _distortion, Ocv::Core::Types_c::pCvPoint2D64f _image_points);
extern "C" TCvSURFParams __cdecl cvSURFParams(double hessianThreshold, int _extended = 0x0);
extern "C" void __cdecl cvExtractSURF(const void * img, const void * mask, Ocv::Core::Types_c::ppCvSeq keypoints, Ocv::Core::Types_c::ppCvSeq descriptors, Ocv::Core::Types_c::pCvMemStorage storage, const TCvSURFParams params, int useProvidedKeyPts = 0x0);
extern "C" Ocv::Core::Types_c::pCvSeq __cdecl cvGetStarKeypoints(const void * img, Ocv::Core::Types_c::pCvMemStorage storage, const TCvStarDetectorParams params);
}	/* namespace Compat */
}	/* namespace Ocv */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_OCV_COMPAT)
using namespace Ocv::Compat;
#endif
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_OCV)
using namespace Ocv;
#endif
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Ocv_CompatHPP
